package struct;

/**
 *
 * @author Gabrielle DuBois
 */
public class Interest extends DBObject{
    private String mname;
    private String avail;

    /**
     * Constructor for a Family or Individual Ministry Interest Object
     * @param ministryName
     * @param availability
     */
    public Interest(String ministryName, String availability){
        super(2,1);
        attributes = new Object[numAttributes];
        attributes[0] = mname = ministryName;
        attributes[1] = avail = availability;

    }//constructor

    /**
     * @see struct.DBObject
     * @return an Object array containing all the attributes that make up a
     *          ministry interest for a family or an individual.
     *          The order is as following: ministryName(String),
     *          availability(String)
     */
    public Object[] getAttributes(){
        return attributes;
    }

    /**
     * @see struct.DBObject
     * @return A String array containing the ministryName in position 0
     */
    public String[] getKey(){
        String[] key = new String[numInPrimaryKey];
        key[0] = mname;

        return key;
    }//getKey()

    /**
     *
     * @return a String containing...
     */
    public String getAvailability(){
        return avail;
    }

}//Interest
